/*
 * @Descripttion: 
 * @version: 1.0
 * @Author: LiYansheng
 * @Date: 2022-04-21 15:50:40
 * @LastEditors: CoderXZ
 * @LastEditTime: 2022-04-21 23:20:31
 */
import request from '@/utils/request'

// 查询
export function search(form){
    return request({
        url:'/college',
        method:'post',
        data:{
            schoolName:form.schoolName,
            no:form.no,
            name:form.name,
            pageIndex:form.pageIndex,
            pageSize:form.pageSize
        }
    })
}

// 添加
export function addCollege(form){
    return request({
        url:'/college/add',
        method:'post',
        data:{
            no:form.no,
            name:form.name,
            schoolId:form.schoolName,
            status:form.status
        }
    })
}

// 删除
export function delCollege(id){
    return request({
        url:'/college/delete',
        method:'post',
        data:{
            id:id
        }
    })
}

// 修改
export function updateCollege(form){
    return request({
        url:'/college/update',
        method:'post',
        data:{
            id:form.id,
            no:form.no,
            name:form.name,
            schoolId:form.schoolName,
            status:form.status
        }
    })
}

// 批量删除
export function delColleges(ids){
    return request({
        url:'/college/delList',
        method:'post',
        data:{
            ids:ids
        }
    })
}

// 获取可用学校名及id
export function searchSchool(){
    return request({
        url:'/school',
        method:'get',
    })
}